<?php
$strScreenName = 'DeleteProductDiscontinuedNotOrdered';
$strQueryName = 'actDeleteProductDiscontinuedNotOrdered';
$strFormName = 'frmDeleteProductDiscontinuedNotOrdered';

include (MODULE . "/action/qrySelectProductDiscontinuedNotOrdered");?>

     <tr align='left'>
         <td align='left' colspan='4'>
             <h3>Products that are discontinued and have not been ordered</h3>
         </td>
     </tr><?

echo (StartForm($strScreenName, "post", $strQueryName,array('int'=>$int),"","",$strFormName,"",""));

//echo $strSQL;
if($arrDeleteProductDiscontinuedNotOrdered->myrow[ID]!="")
{
     do 
     {?>
		<tr bgcolor='<?echo switch_background($boBG) ?>'>
			<td width='100'><a
				href='<?echo ScreenURL("EnterProduct",array('intProductID'=>$arrDeleteProductDiscontinuedNotOrdered->myrow[0]) )?>'
				target='_blank'> <img src='./images<?echo SITE_SUFFIX?>/update.gif'
				border='0' alt='Update' align='middle'></a>
			</td>
			<td valign='top' width='100'><?
				if((!$arrDeleteProductDiscontinuedNotOrdered->myrow["UploadedPicture"])||($arrDeleteProductDiscontinuedNotOrdered->myrow["UploadedPicture"]=="none"))
					echo "no pic";
				else
					echo "<img src='./images".SITE_SUFFIX."/product/thumbz/".$arrDeleteProductDiscontinuedNotOrdered->myrow["UploadedPicture"]."' width='67' border='0' alt=".$arrDeleteProductDiscontinuedNotOrdered->myrow["UploadedPicture"].">";?>
			</td>
			<td width='350'><?
				echo $arrDeleteProductDiscontinuedNotOrdered->myrow["Supplier"] ?>
			</td>
			<td valign='top' class='Small' width='535'><b><?echo $arrDeleteProductDiscontinuedNotOrdered->myrow["Product"]?></b>
				<br/><?
			
				if($arrDeleteProductDiscontinuedNotOrdered->myrow["Discontinued"] > "0")
					echo "Discontinued<br/>";?>
			</td>
		</tr>
		<?

         $boBG = -1 - $boBG;
     } while ($arrDeleteProductDiscontinuedNotOrdered->myrow = mysql_fetch_array($arrDeleteProductDiscontinuedNotOrdered->result));?>

		 <tr>
         <td align='right' colspan='4'>
             <input type='submit' name='cmdDeleteAll' value='Delete Listed Products'>
         </td>
     </tr><? echo "
     </form>";
}else{?>
     <tr class='MandatoryRed'>
         <td colspan='4'>
             There are no unordered discontinued products..
         </td>
     </tr><?
}?>